home *** CD-ROM | disk | FTP | other *** search
/ Programming an RTS Game with Direct3D / Programming an RTS Game with Direct3D.iso / Examples / Chapter 9 / Example 9.3 / player.h < prev    next >
Encoding:
C/C++ Source or Header  |  2006-06-30  |  980 b   |  39 lines

  1. #ifndef _RTS_PLAYER_
  2. #define _RTS_PLAYER_
  3.  
  4. #include <vector>
  5. #include "shader.h"
  6. #include "camera.h"
  7. #include "unit.h"
  8. #include "building.h"
  9. #include "terrain.h"
  10.  
  11. void LoadPlayerResources(IDirect3DDevice9* Device);
  12. void UnloadPlayerResources();
  13.  
  14. class PLAYER
  15. {
  16.     public:
  17.         PLAYER(int _teamNo, D3DXVECTOR4 _teamCol, INTPOINT startPos, TERRAIN* _terrain, IDirect3DDevice9* _Device);
  18.         ~PLAYER();
  19.  
  20.         void AddMapObject(int type, INTPOINT mp, bool isBuilding);
  21.         void RenderMapObjects(CAMERA &camera);
  22.         void PaintSelectedMapObjects(CAMERA &camera);
  23.         void UpdateMapObjects(float deltaTime);
  24.         INTPOINT FindClosestBuildingLocation(int buildType, INTPOINT mp);
  25.         void Select(MOUSE &mouse);
  26.         void UnitOrders(MOUSE &mouse);
  27.         INTPOINT GetCenter();
  28.  
  29.     private:
  30.         IDirect3DDevice9* m_pDevice;
  31.         std::vector<MAPOBJECT*> m_mapObjects;
  32.         D3DXVECTOR4 m_teamColor;
  33.         TERRAIN *m_pTerrain;
  34.         int m_teamNo;
  35.         bool m_areaSelect;
  36.         INTPOINT m_startSel;
  37. };
  38.  
  39. #endif